import 'package:flutter/material.dart';

class ButtonTask extends StatefulWidget {
  @override
  State<ButtonTask> createState() => _ButtonTaskState();
}

class _ButtonTaskState extends State<ButtonTask> {
  @override
  Widget build(BuildContext context) {
    return Center(
      child: Row(
        children: [
          MaterialButton(
            onPressed: () {
              print(666);
            },
            child: Text(
              '按钮',
            ),
            color: Colors.red[300],
          )
        ],
      ),
    );
  }
}
